package org.springmole.business.dao.impl;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import org.springmole.business.bean.DbConnection;

public abstract class AbstractJDBCDaoImpl {

	
	protected Connection openConnection(DbConnection dbConnection) throws SQLException {
		return DriverManager.getConnection(dbConnection.getUrl(), dbConnection.getUserName(), dbConnection.getPassword());
	}
	
	
	protected Connection openConnection(String url, String userName, String password) throws SQLException {
		return DriverManager.getConnection(url, userName, password);
	}	
	
}
